#ifndef __ELEMENT_H__
#define __ELEMENT_H__

#include "Wire.h"
#include "Rect.h"

#define ENAME_SIZE 8

class Element {
	public :
		Element();
		Element(const Element &e);
		Element(const char *, UIntRect);
		~Element();

		void setName(const char *name);
		void setParam(const char *param);
		void setRect(unsigned int left, unsigned int top, 
				unsigned int right, unsigned int bottom);
		void setNport(int nport);
		int makeWire();
		int setWire(Wire *w, int port);
		char *getName();
		char *getParam();
		int getNport();
		Wire *getWire(int port);

        Element& operator=(const Element&);
	private :
		int type;
		int nport;
		char name[ENAME_SIZE];
		char *param;
		UIntRect rect;

		Wire **wire;
};

#endif // __ELEMENT_H__
